home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 7304 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1003 b   |  38 lines

  1. Path: daily-planet.execpc.com!usenet
  2. From: scalish@execpc.com (Sherri Scalish)
  3. Newsgroups: comp.lang.c++
  4. Subject: Constructor classes
  5. Date: 22 Feb 1996 17:17:16 GMT
  6. Organization: Exec-PC Internet
  7. Message-ID: <4gi8es$4gn@daily-planet.execpc.com>
  8. NNTP-Posting-Host: blackmail.execpc.com
  9. Mime-Version: 1.0
  10. Content-Type: Text/Plain; charset=US-ASCII
  11. X-Newsreader: WinVN 0.99.6
  12.  
  13. Hope someone can help me, I'm getting very frustrated.  I have a container 
  14. class in which I have an array of classes:
  15.  
  16.     class OtherClass{
  17.     private:
  18.         char m_itema[30];
  19.         char m_itemb[30];
  20.         ...
  21.     }:
  22.  
  23.     class ContainerClass{
  24.     public:
  25.         OtherClass Items[9];
  26.     ...
  27.     };
  28.  
  29.         
  30. How do I access the array's data members?  I have tried:
  31.     m_itema[0], ContainerClass->m_itema[0], ContainerClass.m_itema[0], 
  32. OtherClass->m_itema[0]. OtherClass.m_itema[0], etc. etc.
  33.  
  34. I have been working on this for days and am getting truly frustated.  I 
  35. would greatly appreciate an E-Mail to solve this mystery.  
  36. scalsh@execpc.com.  Thanks in advance!!!!    
  37.  
  38.